package com.java.code;

import com.java.code.web.config.RenameAnnotationBeanNameGenerator;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;

@SpringBootApplication
@ComponentScan(value = "com.java.code.**", nameGenerator = RenameAnnotationBeanNameGenerator.class)
@ImportResource("classpath*:spring*.xml")
public class CodeApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(CodeApplication.class, args);
        System.out.println("启动成功！");
//
//        MQBusinessHandler  unfinishTaskQueue = (MQBusinessHandler)applicationContext.getBean("unfinishTaskQueue");
//        MQConsumerByKafka  mqConsumer = (MQConsumerByKafka)applicationContext.getBean("mqConsumer");
//        mqConsumer.subscribe("test1", unfinishTaskQueue);
    }

}
